package myTest;


import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ExecutorServiceUtil {
	//自动放款线程池
	public final static ExecutorService autoLoanExecutor = Executors.newFixedThreadPool(10);
	
	public static void main(String[] args) {
		int i = 0;
		try{
			for(;i<100_000_000;i++){
				autoLoanExecutor.execute(new Runnable() {
					
					@Override
					public void run() {
						try {
							Thread.sleep(100_000);
						} catch (InterruptedException e) {
							e.printStackTrace();
						}
						
					}
				});
				System.out.println("第"+i+"个任务放入完成");
			}
		}catch(Exception e){
			e.printStackTrace();
		}
		System.out.println("任务放入完成");
	}

}
